package com.happyclub.pojo;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @Auther: 魏泉琦
 * @Date: 2019/4/12 09:00
 * @Description:  人工审核历史表
 */
@Entity
@Table(name = "TB_MANUAL_AUDIT", schema = "SCOTT")
@EntityListeners(AuditingEntityListener.class)
public class TbManualAudit implements Serializable {
    private String artId;
    private String photoId;
    private String auditMan;
    private Long isOk;
    private Date auditDate;
    private Date updateDate;
    private String auditManName;

    @Basic
    @Column(name = "AUDIT_MAN_NAME")
    public String getAuditManName() {
        return auditManName;
    }

    public void setAuditManName(String auditManName) {
        this.auditManName = auditManName;
    }

    @Id
    @Column(name = "ART_ID")
    public String getArtId() {
        return artId;
    }

    public void setArtId(String artId) {
        this.artId = artId;
    }

    @Basic
    @Column(name = "PHOTO_ID")
    public String getPhotoId() {
        return photoId;
    }

    public void setPhotoId(String photoId) {
        this.photoId = photoId;
    }

    @Basic
    @Column(name = "AUDIT_MAN")
    public String getAuditMan() {
        return auditMan;
    }

    public void setAuditMan(String auditMan) {
        this.auditMan = auditMan;
    }

    @Basic
    @Column(name = "IS_OK")
    public Long getIsOk() {
        return isOk;
    }

    public void setIsOk(Long isOk) {
        this.isOk = isOk;
    }

    @Basic
    @Column(name = "AUDIT_DATE")
    public Date getAuditDate() {
        return auditDate;
    }

    public void setAuditDate(Date auditDate) {
        this.auditDate = auditDate;
    }

    @Basic
    @Column(name = "UPDATE_DATE")
    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbManualAudit that = (TbManualAudit) o;
        return Objects.equals(artId, that.artId) &&
                Objects.equals(photoId, that.photoId) &&
                Objects.equals(auditMan, that.auditMan) &&
                Objects.equals(isOk, that.isOk) &&
                Objects.equals(auditDate, that.auditDate) &&
                Objects.equals(updateDate, that.updateDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(artId, photoId, auditMan, isOk, auditDate, updateDate);
    }
}
